package cn.edu.sdjzu.xg.eagle.entities;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;

@Setter
@Getter
@NoArgsConstructor  //使用Lombok的@NoArgsConstructor注解自动生成无参构造的方法
public class Club {
    private String clubNo;
    private String clubName;
    private String leaderName;
    private Integer leaderId;
    private String clubIntro;
    private String logoPath;
    private String clubCategory;
    private Student student;
    private Date createTime;

    public Club(String clubNo, String clubName, Date createTime, String leaderName, Integer leaderId,
                String clubIntro, String logoPath, String clubCategory) {
        this.clubNo = clubNo;
        this.clubName = clubName;
        this.createTime = createTime;
        this.leaderName = leaderName;
        this.leaderId = leaderId;
        this.clubIntro = clubIntro;
        this.logoPath = logoPath;
        this.clubCategory = clubCategory;
    }

    // 重写toString方法
    @Override
    public String toString() {
        return "Club{" +
                "clubNo='" + clubNo + '\'' +
                ", clubName='" + clubName + '\'' +
                ", createTime=" + createTime +
                ", leaderName='" + leaderName + '\'' +
                ", leaderId='" + leaderId + '\'' +
                ", clubIntro='" + clubIntro + '\'' +
                ", logoPath='" + logoPath + '\'' +
                ", clubCategory='" + clubCategory + '\'' +
                ", student=" + (student != null ? student.getName() : "null") +
                '}';
    }
}
